package com.dlkj.threadPool.service.impl;

import com.dlkj.threadPool.entity.SysUser;
import com.dlkj.threadPool.repository.SysUserRepository;
import com.dlkj.threadPool.service.SysUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author : lei
 * @Company ：DiLang Technology
 * @Date : 2019/1/17 16:34
 * @Description :
 **/
@Service
public class SysUserServiceImpl implements SysUserService {

    @Resource
    private SysUserRepository userRepository;

    @Override
    public SysUser selectUserById(Integer id) {
        return userRepository.getOne(id);
    }

    @Override
    public SysUser selectUserByName(String name) {
        return userRepository.findByNameEquals(name);
    }
}
